﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/BlogAdmin.Master" AutoEventWireup="true" CodeBehind="PostNew.aspx.cs" Inherits="Press.MVC.Web.Views.BlogAdmin.PostNew" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<%= Html.Validation().ValidatorRegistrationScripts() %>
</asp:Content>
<asp:Content ID="indexContent" ContentPlaceHolderID="MainContentPlaceHolder" runat="server">
  <%= ViewData.Model.Blog.ID %>
 <% using (Html.Form("BlogAdmin", "PostNewSave", FormMethod.Post, Html.Validation().FormValidation("required"))) { %> 
 
    <%= Html.Hidden("blogid",ViewData.Model.Blog.ID.ToString())%>
    
     <table>
     
                
            <tr>
                <td>Category:</td>
                <td><%= Html.Form().Select("categoryId", ViewData.Model.PostCategories, "Name", "ID", new Hash(firstOption => "Please select...")) %>
                
                </td>
            </tr>



            <tr>
                <td>Title:</td>
                <td><input id="Title" type="text" name="Title" maxlength="50" />
                <%= Html.Validation().RequiredValidator("titleVal", "Title", "You must supply a 'Post' Title.", "required")%>
                </td>
            </tr>

            <tr>
                <td>Summary:</td>
                <td><input id="Summary" type="text" name="Summary" maxlength="255" />                
                <%= Html.Validation().RequiredValidator("summaryVal", "Summary", "You must supply a 'Post' Summary.", "required")%>
                </td>
            </tr>

            <tr>
                <td>Body:</td>
                <td><%=Html.TextArea("Body","",15,50) %>
                <br />
                <%= Html.Validation().RequiredValidator("bodyVal", "Body", "You must supply a 'Post' Body.", "required")%>
                </td>
            </tr>
            <% string [] arYesNo =new string[]{"Yes","No"}; %>
            <tr>
                <td>Enabled Comments:</td>
                <td><%=Html.RadioButton("AllowComments", "Yes","True",true) %> <%=Html.RadioButton("AllowComments", "No","False",false) %></td>
            </tr>
            
        </table>

        <p></p>
    
    <%= Html.Validation().ValidatorInitializationScripts() %>
    <%= Html.SubmitButton("savepost","Save")%>
    
<%}%>
 
 
</asp:Content>
